home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 26.zip
/
BS1 part 26
/
C for beginners.adf
/
source
/
copystr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1978-01-17
|
419b
|
24 lines
/* copysrt.c 12.3.1 */
#define EOS '\0'
#define MAXLEN 81
strcpy(to,from)
char to[], from[];
{
int i = 0;
while((to[i] = from[i]) != EOS)
i++;
}
main()
{
char s1[MAXLEN], s2[MAXLEN], s3[MAXLEN];
printf("Your name, please\n");
scanf("%40s", s1);
strcpy(s3, s1);
strcpy(s2, "TEXT IN s2");
printf("Therefore %s, in s2 is \"%s\".", s1 ,s2);
printf(" I hope %s, that everything is clear!\n", s3);
}